<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Demo1</title>
</head>
<body>
    <div class="box1">
        box1
    </div>
    <div class="box2">
        box2
    </div>
    <h3>
        <span>
            <input type="text" name="" >
        </span>
    </h3>
</body>
<script>
    console.log(document.querySelector(".box1"));
    console.log(document.querySelector(".box2"));

    console.log(document.querySelector("h3").querySelector("span").querySelector("input"));
    
    console.log(document.querySelectorAll("div"));
</script>
</html>